
		var mousePosX=0;
		var mousePosY=0;
		var arrowKeyUp=0;
		var arrowKeyLeft=0;
		var arrowKeyRight=0;
		
		window.addEventListener("mousemove", onMouseMove, true);
		window.addEventListener("click", onMouseClick, true);

		window.addEventListener("keydown", keyDown, true);
		window.addEventListener("keyup", keyUp, true);

		function onMouseMove(evt) 
		{
			alert("on Mouse Move"
					+"\n"
					+" key x"
					+evt.pageX
					+"key y"
					+ evt.pageY)
			mousePosX = evt.pageX;
			mousePosY = evt.pageY;
		}

		function onMouseClick(evt) 
		{
			alert("key X"+evt.pageX+"key Y"+evt.pageY);
			mousePosX = evt.pageX;
			mousePosY = evt.pageY;
		}


		function keyDown(evt)
		{

			if (evt.keyCode == 39)
			       	rightDown = true;
			else if (evt.keyCode == 37) 
				leftDown = true;
		}

		function keyUp(evt)
		{

			alert("set up"+evt.keyCode);
			if (evt.keyCode == 39)
				rightDown = false;
			else if (evt.keyCode == 37)
				leftDown = false;
		}

